package fristphase.day9_13;

public class MyStringBuilder {
    public static void main(String[] args) {
        String str = "我是张三";
        StringBuilder stringBuilder = new StringBuilder(str);//将String类型对象内容赋值给StringBuilder对象方便操作

        stringBuilder.append("，我今年18岁");
        System.out.println(stringBuilder);

        stringBuilder.delete(2,4);

        stringBuilder.insert(2,"李四");
        System.out.println(stringBuilder);
        System.out.println(str);//StringBuilder对象进行操作不影响原String对象
    }

}
